﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="calendar.aspx.vb" Inherits="bookmeetprototype.calendar" %>
<% @Register Namespace="DataControls" Assembly="DataCalendar" TagPrefix="dc" %>
<%@ Register Assembly = "AjaxControlToolkit" Namespace = "AjaxControlToolkit" TagPrefix = "AjaxControlToolkit" %>
<%@ Register Assembly="GMaps" Namespace="Subgurim.Controles" TagPrefix="cc1" %>

        
        <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <ul class="breadcrumb">
    <li><a id="A1" runat="server" href="~/Default.aspx">Home</a> <span class="divider">/</span></li>
    <li><a id="A2" runat="server" href="~/calendar.aspx">Calendar</a> <span class="divider">/</span></li>
    <li class="active">
        <asp:LoginName ID="LoginName1" runat="server" />'s Calendar
    </li>
    </ul>
        <dc:DataCalendar id="cal1" runat="server" DayField="EventDate"
                             VisibleDate='<%# DateTime.Now %>'
                             Font-Name="Tahoma"
                             SelectionMode="Day"
                             SelectedDate='<%# DateTime.Now %>'
                             ShowGridLines="False"
                             OnSelectionChanged="SelectionChange"
                             OnVisibleMonthChanged="MonthChange" Height="528px" 
            Width="867px">

                <TitleStyle BackColor="#F9263C"  ForeColor="white" Font-Bold="True"/>
                <DayHeaderStyle BackColor="Gray"  Font-Size="12" ForeColor="white" 
                    Font-Bold="True" BorderColor="Black" BorderStyle="Solid" 
                    BorderWidth="1px"/>
                <NextPrevStyle ForeColor="white" Font-Size="18px" Font-Bold="True"/>                                                            
                <DayStyle Font-Size="10" />
                <DayWithEventsStyle ForeColor="#0033ff" Font-Bold="True" />                
                <SelectedDayStyle BackColor="#99ccff" BorderColor="Blue" BorderStyle="Dashed" 
                    BorderWidth="1px" />
                <WeekendDayStyle BackColor="lightYellow" />
                          
                <OtherMonthDayStyle BackColor="LightGray" ForeColor="DarkGray"
                           />

            </dc:DataCalendar>
            
            <br />
            <div class="notepad"><h3>Your Events:</h3><asp:Label id="lblDate" runat="server" />
            <p><strong><asp:Label id="lblNoEvents" runat="server" Text="No Events For Selected Date." /></strong></p>
            <asp:Repeater id="dg" runat="server">
                <HeaderTemplate>
                    <ul>
                </HeaderTemplate>
                
                <ItemTemplate>
                    <table style="border:0;padding:5px;border-color:transparent;">
	<tbody>
		<tr>
			<td><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "eventDetail.aspx?ID=" + Eval("EventID").ToString() %>' ToolTip="Go to Event Detail Page"><%# DataBinder.Eval(Container.DataItem, "EventTitle")%></asp:HyperLink> -  <%# DataBinder.Eval(Container.DataItem, "EventDate")%></td>
			<td>
            <asp:Image ID="Image1" ToolTip='<%# Eval("CategoryTitle") %>'  cssClass="eventinformationsymbols" ImageUrl='<%#Eval("CategoryImage") %>' runat="server" />
            </td>
		</tr>
	</tbody>
</table>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</asp:Repeater>
              
               </div>
              
            </asp:Content>
            <asp:Content ID="Content3" ContentPlaceHolderID="SidebarContent" runat="server">
               
                
<ajaxtoolkit:toolkitscriptmanager ID="ToolkitScriptManager1" runat="server"></ajaxtoolkit:toolkitscriptmanager>
<h3>Add New Event:</h3>
                <p>Title of Event:
                    <asp:TextBox ID="tb_eventtitle" runat="server"></asp:TextBox>
                </p>
                <p>Event Description:
                    <asp:TextBox ID="tb_eventdescription" runat="server"></asp:TextBox>
                </p>
                <p>Event Date:
                    <asp:TextBox ID="tb_eventdate" runat="server" ToolTip="Enter a date"></asp:TextBox>
                    <ajaxtoolkit:calendarextender ID="tb_eventdate_CalendarExtender"  
                        Format="dd/MM/yyyy" runat="server" 
                        TargetControlID="tb_eventdate">
                    </ajaxtoolkit:calendarextender>
                </p>
                <p>Event Category:
                    <asp:DropDownList ID="dd_eventcategory" runat="server" 
                        DataSourceID="SqlDataSource1" DataTextField="CategoryTitle" 
                        DataValueField="CategoryTitle">
                    </asp:DropDownList>
                </p>
                    
    Meeting Location:
                    <p>Please enter your meeting location in the fields below. <i>(Required)</i></p>
                    <p>Address: <asp:textbox ID="txtStreetAddress" runat="server" Width="180px" /></p>
    <p>Town: <asp:textbox ID="txtSuburb" runat="server" Width="150px" /></p>
    <p>Country: <asp:textbox ID="txtCountry" runat="server" Width="150px" /></p>
    <asp:Button Text="Validate Address" ID="lnkShowMap" runat="server" Height="27px" 
                        ToolTip="Please validate your meeting address" Width="129px" />

                    <br />
                    <asp:Label ID="nocoordinatesmessage" runat="server" ForeColor="Red"></asp:Label>
                    <br /><br />
                    <cc1:GMap ID="GMap1" runat="server" GZoom="1" Height="200px" 
                        Width="220px" ajaxUpdateProgressMessage="Loading" enableDragging="False" 
                        enableServerEvents="True" BorderColor="Black" BorderStyle="Dashed" 
                    BorderWidth="1px" />
                    <br />
                    <asp:Label ID="lb_showcoordinates" runat="server" Visible="False"></asp:Label>
&nbsp;<p>
                    <asp:Button ID="Button1" runat="server" Text="Add Event!" Height="24px" 
                            Width="87px" />
                </p>
                    <p>
                        &nbsp;</p>
           
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:BookMeetConnString %>" 
                        ProviderName="<%$ ConnectionStrings:BookMeetConnString.ProviderName %>" 
                        SelectCommand="SELECT [CategoryTitle] FROM [Categories]">
                    </asp:SqlDataSource>
</asp:Content>

